import React,{DetailedReactHTMLElement,FunctionComponentElement} from "react";
import ReactDOM from "react-dom";
import App from './App'
import store from './page/react-redux/store'
import {Provider} from 'react-redux'
interface Props{
    className:string
}
interface State{
    id:string
}
const props:Props = {className:'title'}
/*
渲染原生组件 

const element:DetailedReactHTMLElement<Props> = React.createElement<Props,HTMLHeadingElement>('h1',{className:'title'},'hello')
ReactDOM.render(element,document.getElementById("root"))

*/

/**渲染函数组件
 * 
 * 
 * 

 */


ReactDOM.render(
    <Provider store={store}>
        <App />
    </Provider>,
    document.getElementById("root")
)

/**
 * 渲染类组件
 * 
 * class Hello extends React.Component<Props,State>{
    State = {id:'test'}
    render(){
       return React.createElement('h1',props,'hello1')
    }
}
const element = (
    React.createElement<Props>(Hello,props)
)
ReactDOM.render(element,document.getElementById("root"))
 * 
 */
